class Dog {
  String? name;
  int? _age = 5;

  // 构造函数
  Dog(this.name);

  void _eat() {
    print('吃');
  }

  void test() {
    print({this.name, this._age});
    _eat();
  }
}
